package com.delicious.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.delicious.system.entity.Permisson;
import com.delicious.system.DTO.RolePermisson;
import org.apache.ibatis.annotations.Select;

import java.util.List;


public interface PermissionMapper extends BaseMapper<Permisson> {

    @Select("SELECT A.NAME AS roleName,C.url FROM role AS A LEFT JOIN role_permission B ON A.id=B.role_id LEFT JOIN permission AS C ON B.permission_id=C.id")
    List<RolePermisson> getRolePermissions();

}
